﻿namespace IceZero.RootNode
{
    public partial class IceZeroNode
    {
        private static IceZeroNode _default;
        private static object lockA = new();
        /// <summary>
        /// 默认实例
        /// </summary>
        public static IceZeroNode Default
        {
            get
            {
                if (_default == null)
                {
                    lock (lockA)
                    {
                        if (_default == null)
                        {
                            _default = new IceZeroNode();
                        }
                    }
                }
                return _default;
            }
        }

        public DataStoreNode DataStoreNode { get; set; }

        public BusinessNode BusinessNode { get; set; }

        public IceZeroNode()
        {
            DataStoreNode = new DataStoreNode();
            BusinessNode = new BusinessNode(DataStoreNode);
        }
    }
}
